package hevs.greencontrol.objects;

public class Point {

	// DATA
	private float x;
	private float y;
	
	
	// METHODS
	
	/**
	 * Constructor with x and y in parameter
	 * @param x
	 * @param y
	 */
	public Point(float x, float y)
	{
		this.x = x;
		this.y = y;
	}
	
	/**
	 * Constructor with point in parameter
	 * @param point
	 */
	public Point(Point point)
	{
		x = point.getX();
		y = point.getY();
	}
	
	/**
	 * Move the point with the distance of x and y in parameters
	 * @param moveX
	 * @param moveY
	 */
	public void movePoint(float moveX, float moveY)
	{
		x += moveX;
		y += moveY;
	}
	
	
	// Getters / Setters
	
	/**
	 * Get the value of x
	 * @return x
	 */
	public float getX()
	{
		return x;
	}

	/**
	 * Set the value of x
	 * @param x
	 */
	public void setX(float x)
	{
		this.x = x;
	}
	
	/**
	 * Get the value of y
	 * @return y
	 */
	public float getY()
	{
		return y;
	}
	
	/**
	 * Set the value of y
	 * @param y
	 */
	public void setY(float y)
	{
		this.y = y;
	}
	
	/**
	 * Set the value of x and y
	 * @param x
	 * @param y
	 */
	public void setXY(float x, float y)
	{
		setX(x);
		setY(y);
	}
	
}
